Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: run only linting hooks in lint-fix workflow #5107

Merged
merged 1 commit into from
Nov 18, 2024
Merged

Conversation

neubig
Copy link
Contributor

@neubig neubig commented Nov 18, 2024

When the lint-fix.yml workflow runs and tests are failing, git is stopped by pre-commit. This change modifies the workflow to only run linting hooks that can auto-fix issues, skipping test hooks.

Changes:

  • Run each linting hook individually instead of running all hooks at once
  • Only run hooks that can auto-fix issues (trailing-whitespace, end-of-file-fixer, pyproject-fmt, ruff, ruff-format)
  • Skip test hooks and type checking hooks

Fixes: #5102


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:38f5c90-nikolaik   --name openhands-app-38f5c90   docker.all-hands.dev/all-hands-ai/openhands:38f5c90

@neubig neubig enabled auto-merge (squash) November 18, 2024 18:33
@neubig neubig merged commit a87b859 into main Nov 18, 2024
13 checks passed
@neubig neubig deleted the fix-lint-workflow branch November 18, 2024 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: lint-fix.yml workflow doesn't work when (frontend) tests are failing
3 participants